package com.tuanbiao.controllers;

import com.hzjq.data.entity.BlastEntity;
import com.hzjq.lib.cap.bean.ErrorCap;
import com.tuanbiao.base.mvp.IModel;
import com.tuanbiao.base.mvp.IPresenter;
import com.tuanbiao.base.mvp.IView;
import com.tuanbiao.models.action.BlastAction;
import com.tuanbiao.models.action.ChargeAction;
import com.tuanbiao.models.action.CheckAction;
import com.tuanbiao.models.action.NettedAction;

import java.util.List;

/**
 * @author abiao
 * @since 2022/4/25 15:13
 */
public interface BlastController {
    interface Model extends IModel, NettedAction, ChargeAction, BlastAction, CheckAction {

    }

    interface View extends IView {

        void showVoltageElectric(float voltage, float electric);

        void showProgress(int progress, String msg);

        void startBlast();

        void blastFinish(boolean success, String msg);

        void blastFailed(String errorMsg);

        void startCharge();

        void chargeFinish(boolean chargeSuccess, String msg);

        void chargeError(String msg);

        void chargeFailed(String errorMsg);

        void startErrorCap(List<ErrorCap> errorCaps);

        void startUpload(BlastEntity blastEntity);


    }

    interface Presenter extends IPresenter {
        void charge();

        void cancelCharge();

        void exitCharge();

        void blast();

        void forceBlast();

        void cancelBlast();

        void exitBlast();

        void exit();

        boolean isBlastSuccess();

        void checkErrorCaps();

        void startUpload();
    }

    interface CheckView extends IView {
        void showCheckDialog();

        void hideCheckDialog();

        void showProgress(int progress, String msg);

        void showVoltageElectric(float voltage, float electric);

        void showCheckStatus(String status);

        void showCheckNote(String msg);

        void showCheckResult(boolean visibility, String msg);

        void showCheckErrorResult(String msg);

        void setChargeEnable(boolean enable);

        void setRecheckEnable(boolean enable);

        void setCancelEnable(boolean enable);

        void startCharge();

        void startErrorCaps(List<ErrorCap> mErrorCaps);

        void showExit();

        void hideExit();

        void exitFailed();
    }

    interface CheckPresenter extends IPresenter {
        void checkNetted();

        void cancelNetted();

        void exitNetted();

        void startCharge();

        void checkErrorCaps();

        void doErrorNext();
    }


}
